<?php
require("../../class/connect.php");
require("../../class/db_sql.php");
require("../../class/q_functions.php");
require("../../class/user.php");
require("../../data/dbcache/MemberLevel.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
//是否登陸
$user=islogin();
$r=ReturnUserInfo($user[userid]);
$addr=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid='".$user[userid]."' limit 1");
//頭像
$userpic=$addr['userpic']?$addr['userpic']:$public_r[newsurl].'e/data/images/nouserpic.gif';
//有效期
$userdate=0;
if($r[userdate])
{
	$userdate=$r[userdate]-time();
	if($userdate<=0)
	{
		$userdate=0;
	}
	else
	{
		$userdate=round($userdate/(24*3600));
	}
}
//是否有短信息
$havemsg="Нет ";
if($user[havemsg])
{
	$havemsg="<a href='".$public_r['newsurl']."e/member/msg' target=_blank><font color=red>Вы получили новые сообщения </font></a>";
}
//註冊時間
$registertime=$r[registertime];
if($user_register)
{
	$registertime=date("Y-m-d H:i:s",$r[registertime]);
}
//導入模板
require(ECMS_PATH.'e/template/member/cp.php');
db_close();
$empire=null;
?>